# -*- coding: utf-8 -*-
# __author__ = 'xxx'
# env:
# fuction: 使用 urllib2 模拟请求

import urllib2


#模拟 User-Agent
#Python模拟浏览器发送http请求

headers = {'User-Agent':'Mozilla/5.0 '}   

req = urllib2.Request("http://xxxxx", headers=headers)
html = urllib2.urlopen(req).read()
print html


